package com.open.exam.enums;

/**
 * @author 奶茶
 * 考试计划系统状态 未下载
 * Created on 2017/11/15.
 */
public enum ExamPlanSysState {

    UNDownload("未下载",0),
    Downloading("下载中",1),
    Downloaded("已下载",2),
    Verified("已检测",3),
    Imported("已导入",4),
    DownLoadUNPaperCreated("计划已加载，科目试卷未完全生成",5),
    TestPaperCreated("下载完成且已生成试卷",6),
    Closed("结束",7),
    ;

    String display;
    Integer prefix;

    ExamPlanSysState(String display, Integer prefix) {
        this.display = display;
        this.prefix = prefix;
    }

    public static String getName(Integer prefix){
        String name = "";
        ExamPlanSysState[] values = ExamPlanSysState.values();
        for (ExamPlanSysState value:values) {
            if(value.getPrefix().equals(prefix)){
                name = value.getDisplay();
            }
        }
        return name;
    }

    public String getDisplay() {
        return display;
    }

    public void setDisplay(String display) {
        this.display = display;
    }

    public Integer getPrefix() {
        return prefix;
    }

    public void setPrefix(Integer prefix) {
        this.prefix = prefix;
    }
}
